﻿<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="Bookmark" href="favicon.ico">
    <link rel="Shortcut Icon" href="favicon.ico"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="lib/html5.js"></script>
    <script type="text/javascript" src="lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin"/>
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css"/>
    <!--layui-->
    <link rel="stylesheet" href="static/layui/css/layui.css" media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
    <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="js/admin.check.login.js"></script>

    <!--自定义工具-->
    <script type="text/javascript" src="js/HttpUtil.js"></script>
    <!--导入 vue 包-->
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <!--[if IE 6]>
    <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js"></script>
    <script>DD_belatedPNG.fix('*');</script><![endif]-->
    <!--/meta 作为公共模版分离出去-->

    <title>评论列表</title>
    <meta name="keywords" content="H-ui.admin v3.0,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
    <meta name="description" content="H-ui.admin v3.0，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<body>

<script>
    var urlParam = getUrlParam("userId");
    console.log("参数id======" + urlParam);
</script>
<!--_header 作为公共模版分离出去-->
<header class="navbar-wrapper">
    <div class="navbar navbar-fixed-top">
        <div class="container-fluid cl"><a class="logo navbar-logo f-l mr-10 hidden-xs" href="/aboutHui.shtml">H-ui.admin</a>
            <a class="logo navbar-logo-m f-l mr-10 visible-xs" href="/aboutHui.shtml">H-ui</a> <span
                    class="logo navbar-slogan f-l mr-10 hidden-xs">v3.0</span> <a aria-hidden="false"
                                                                                  class="nav-toggle Hui-iconfont visible-xs"
                                                                                  href="javascript:;">&#xe667;</a>
            <nav class="nav navbar-nav">
                <ul class="cl">
                    <li class="dropDown dropDown_hover"><a href="javascript:;" class="dropDown_A"><i
                            class="Hui-iconfont">&#xe600;</i> 新增 <i class="Hui-iconfont">&#xe6d5;</i></a>
                        <ul class="dropDown-menu menu radius box-shadow">
                            <li><a href="javascript:;" onclick="article_add('添加资讯','article-add.html')"><i
                                    class="Hui-iconfont">&#xe616;</i> 资讯</a></li>
                            <li><a href="javascript:;" onclick="picture_add('添加资讯','picture-add.html')"><i
                                    class="Hui-iconfont">&#xe613;</i> 图片</a></li>
                            <li><a href="javascript:;" onclick="product_add('添加资讯','product-add.html')"><i
                                    class="Hui-iconfont">&#xe620;</i> 产品</a></li>
                            <li><a href="javascript:;" onclick="member_add('添加用户','member-add.html','','510')"><i
                                    class="Hui-iconfont">&#xe60d;</i> 用户</a></li>
                        </ul>
                    </li>
                </ul>
            </nav>
            <nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
                <ul class="cl">
                    <li>超级管理员</li>
                    <li class="dropDown dropDown_hover"><a href="#" class="dropDown_A">admin <i class="Hui-iconfont">&#xe6d5;</i></a>
                        <ul class="dropDown-menu menu radius box-shadow">
                            <li><a href="javascript:;" onClick="myselfinfo()">个人信息</a></li>
                            <li><a href="login.html">切换账户</a></li>
                            <li><a href="#">退出</a></li>
                        </ul>
                    </li>
                    <li id="Hui-msg"><a href="#" title="消息"><span class="badge badge-danger">1</span><i
                            class="Hui-iconfont" style="font-size:18px">&#xe68a;</i></a></li>
                    <li id="Hui-skin" class="dropDown right dropDown_hover"><a href="javascript:;" class="dropDown_A"
                                                                               title="换肤"><i class="Hui-iconfont"
                                                                                             style="font-size:18px">&#xe62a;</i></a>
                        <ul class="dropDown-menu menu radius box-shadow">
                            <li><a href="javascript:;" data-val="default" title="默认（黑色）">默认（黑色）</a></li>
                            <li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
                            <li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
                            <li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
                            <li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
                            <li><a href="javascript:;" data-val="orange" title="橙色">橙色</a></li>
                        </ul>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</header>
<!--/_header 作为公共模版分离出去-->


<!--_menu 作为公共模版分离出去-->
<aside class="Hui-aside">

    <div class="menu_dropdown bk_2">
        <dl id="menu-article">
            <dt><i class="Hui-iconfont">&#xe616;</i> 资讯管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
            <dd>
                <ul>
                    <li><a href="article-list.html" title="资讯管理">资讯管理</a></li>
                </ul>
            </dd>
        </dl>
        <dl id="menu-picture">
            <dt><i class="Hui-iconfont">&#xe613;</i> 图片管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
            <dd>
                <ul>
                    <li><a href="picture-list.html" title="图片管理">图片管理</a></li>
                </ul>
            </dd>
        </dl>
        <dl id="menu-product">
            <dt><i class="Hui-iconfont">&#xe620;</i> 产品管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
            <dd>
                <ul>
                    <li><a href="product-brand.html" title="品牌管理">品牌管理</a></li>
                    <li><a href="product-category.html" title="分类管理">分类管理</a></li>
                    <li><a href="product-list.html" title="产品管理">产品管理</a></li>
                </ul>
            </dd>
        </dl>
        <dl id="menu-comments">
            <dt class="selected"><i class="Hui-iconfont">&#xe622;</i> 评论管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>
            </dt>
            <dd style="display:block">
                <ul>
                    <li class="current"><a href="feedback-list.html" title="评论列表">评论列表</a></li>
                </ul>
            </dd>
        </dl>
        <dl id="menu-member">
            <dt><i class="Hui-iconfont">&#xe60d;</i> 会员管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
            <dd>
                <ul>
                    <li><a href="member-list.html" title="会员列表">会员列表</a></li>
                    <li><a href="member-del.html" title="删除的会员">删除的会员</a></li>
                    <li><a href="member-level.html" title="等级管理">等级管理</a></li>
                    <li><a href="member-scoreoperation.html" title="积分管理">积分管理</a></li>
                    <li><a href="member-record-browse.html" title="浏览记录">浏览记录</a></li>
                    <li><a href="member-record-download.html" title="下载记录">下载记录</a></li>
                    <li><a href="member-record-share.html" title="分享记录">分享记录</a></li>
                </ul>
            </dd>
        </dl>
        <dl id="menu-admin">
            <dt><i class="Hui-iconfont">&#xe62d;</i> 管理员管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
            <dd>
                <ul>
                    <li><a href="admin-role.html" title="角色管理">角色管理</a></li>
                    <li><a href="admin-permission.html" title="权限管理">权限管理</a></li>
                    <li><a href="admin-list.html" title="管理员列表">管理员列表</a></li>
                </ul>
            </dd>
        </dl>
        <dl id="menu-tongji">
            <dt><i class="Hui-iconfont">&#xe61a;</i> 系统统计<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
            <dd>
                <ul>
                    <li><a href="charts-1.html" title="折线图">折线图</a></li>
                    <li><a href="charts-2.html" title="时间轴折线图">时间轴折线图</a></li>
                    <li><a href="charts-3.html" title="区域图">区域图</a></li>
                    <li><a href="charts-4.html" title="柱状图">柱状图</a></li>
                    <li><a href="charts-5.html" title="饼状图">饼状图</a></li>
                    <li><a href="charts-6.html" title="3D柱状图">3D柱状图</a></li>
                    <li><a href="charts-7.html" title="3D饼状图">3D饼状图</a></li>
                </ul>
            </dd>
        </dl>
        <dl id="menu-system">
            <dt><i class="Hui-iconfont">&#xe62e;</i> 系统管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
            <dd>
                <ul>
                    <li><a href="system-base.html" title="系统设置">系统设置</a></li>
                    <li><a href="system-category.html" title="栏目管理">栏目管理</a></li>
                    <li><a href="system-data.html" title="数据字典">数据字典</a></li>
                    <li><a href="system-shielding.html" title="屏蔽词">屏蔽词</a></li>
                    <li><a href="system-log.html" title="系统日志">系统日志</a></li>
                </ul>
            </dd>
        </dl>
    </div>
</aside>
<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a>
</div>
<!--/_menu 作为公共模版分离出去-->

<section class="Hui-article-box">
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i>
        首页 <span class="c-gray en">&gt;</span>
        评论管理 <span class="c-gray en">&gt;</span>
        评论列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
                href="javascript:location.replace(location.href);" title="刷新">
            <i class="Hui-iconfont">&#xe68f;</i></a>
    </nav>

    <div class="Hui-article">
        <article class="cl pd-20">

            <div class="text-c" id="search_for"> 评论查询：
                <input type="date" id="startDate"
                       style=" margin-right:10px; height:28px; line-height:28px; margin-top:2px;float:left"
                       v-model="startDate">
                <input type="date" id="endDate"
                       style=" margin-right:10px; height:28px; line-height:28px;margin-top:2px; float:left"
                       v-model="endDate">
                <input type="text" class="input-text" style="width:250px" placeholder="请输入关键词" id="search_for_key"
                       name="" v-model="searchKey">
                <button type="button" class="btn btn-success radius" name="" @click="getCommentsForsearch()">
                    <i class="Hui-iconfont">&#xe665;</i>
                    搜评论
                </button>

                <button type="button" class="btn btn-success radius" name="" @click="getForDate()"
                        style="margin-top:2px;float:left;">
                    <i class="Hui-iconfont">&#xe665;</i>
                    按日期查询
                </button>
            </div>


            <div class="cl pd-5 bg-1 bk-gray mt-20" id="del_all_vue">
                <span class="l">
                    <a href="javascript:;" @click="dataDel()" class="btn btn-danger radius">
                    <i class="Hui-iconfont">&#xe6e2;</i> 批量删除
                    </a>
                </span>
                <span class="r">共有数据：<strong>{{dataTotal}}</strong>条</span>
            </div>


            <div class="mt-20">
                <table class="table table-border table-bordered table-hover table-bg" id="t_main_vue">
                    <thead>
                    <tr class="text-c">
                        <th width="25"><input type="checkbox" v-model="checked" @change="changeAllChecked()"></th>
                        <th width="60">评论ID</th>
                        <th width="60">用户名</th>
                        <th>评论内容</th>
                        <th width="100">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr class="text-c" v-for="(commentObj,index) in resultList">
                        <td><input type="checkbox" :value="commentObj.id" v-model="checkedIds"></td>

                        <td>{{commentObj.id}}</td>

                        <td>
                            <a href="javascript:;"
                               @click="member_show('','member-show.html',commentObj.userId,'360','400')">
                                <i class="avatar size-L radius">
                                    <img :src="userImg[index]"/>
                                </i>
                            </a>
                        </td>

                        <td class="text-l">
                            <div class="c-999 f-12">
                                <u style="cursor:pointer" class="text-primary"
                                   @click="member_show('','member-show.html',commentObj.userId,'360','400')">{{commentObj.user.userName}}</u>
                                <time title="2014年8月31日 下午3:20" datetime="2014-08-31T03:54:20">
                                    {{commentObj.createTime}}
                                </time>
                                <span class="ml-20">{{commentObj.user.integral}}</span>
                                <span class="ml-20">{{commentObj.user.email}}</span>
                            </div>
                            <div class="f-12 c-999">
                            </div>
                            <div>评论内容：{{commentObj.userContent}}</div>
                        </td>

                        <td class="td-manage">
                            <!--<a title="编辑" href="javascript:;" onclick="member_edit('编辑','member-add.html','4','','510')"-->
                            <!--style="text-decoration:none">-->
                            <!--<i class="Hui-iconfont">&#xe6df;</i>-->
                            <!--</a>-->
                            <a title="删除" href="javascript:;" @click="member_del(this,commentObj.id,index)" class="ml-5"
                               style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i>
                            </a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </article>
        <!--<div style="margin-left: 50px">-->
        <!--<button style="padding: 3px; margin-right: 15px"-->
        <!--onclick="main_vue.getComments(main_vue.currentPage==1 ? 1 : main_vue.currentPage+1)">-->
        <!--上一页-->
        <!--</button>-->
        <!--<button style="padding: 3px" onclick="main_vue.getComments(main_vue.currentPage+1)">下一页</button>-->
        <!--</div>-->

        <!--layui分页条-->
        <div id="pagination"></div>

    </div>
</section>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.page.js"></script>
<!--/_footer /作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="lib/datatables/1.10.15/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>

<!--layui-->
<script src="static/layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->

<script type="text/javascript">
    $(function () {
        $('.table-sort').dataTable({
            "aaSorting": [[1, "desc"]],//默认第几个排序
            "bStateSave": true,//状态保存
            "aoColumnDefs": [
                //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
                {"orderable": false, "aTargets": [0, 2, 4]}// 制定列不参与排序
            ]
        });
        $('.table-sort tbody').on('click', 'tr', function () {
            if ($(this).hasClass('selected')) {
                $(this).removeClass('selected');
            }
            else {
                table.$('tr.selected').removeClass('selected');
                $(this).addClass('selected');
            }
        });
    });

    /*用户-添加*/
    function member_add(title, url, w, h) {
        layer_show(title, url, w, h);
    }


    /*用户-停用*/
    function member_stop(obj, id) {
        layer.confirm('确认要停用吗？', function (index) {
            $(obj).parents("tr").find(".td-manage").prepend('<a style="text-decoration:none" onClick="member_start(this,id)" href="javascript:;" title="启用"><i class="Hui-iconfont">&#xe6e1;</i></a>');
            $(obj).parents("tr").find(".td-status").html('<span class="label label-defaunt radius">已停用</span>');
            $(obj).remove();
            layer.msg('已停用!', {icon: 5, time: 1000});
        });
    }

    /*用户-启用*/
    function member_start(obj, id) {
        layer.confirm('确认要启用吗？', function (index) {
            $(obj).parents("tr").find(".td-manage").prepend('<a style="text-decoration:none" onClick="member_stop(this,id)" href="javascript:;" title="停用"><i class="Hui-iconfont">&#xe631;</i></a>');
            $(obj).parents("tr").find(".td-status").html('<span class="label label-success radius">已启用</span>');
            $(obj).remove();
            layer.msg('已启用!', {icon: 6, time: 1000});
        });
    }

    /*用户-编辑*/
    function member_edit(title, url, id, w, h) {
        layer_show(title, url, w, h);
    }

    /*密码-修改*/
    function change_password(title, url, id, w, h) {
        layer_show(title, url, w, h);
    }

    var main_vue = new Vue({
        el: "#t_main_vue",
        data: {
            //页面数据
            currentPage: 1, //当前页码
            pageSize: 5, //每页显示的数量
            commentsPb: {}, //分页对象
            dataTotal: 0, //数据总数
            resultList: [], //结果集中数据的长度是由pageSize决定的
            userInfo: {}, //用户信息
            checkedIds: [], //选中的id
            delData: 0, //删除的返回结果
            checked: false, //是否全选
            checkArr: [], //放全选的id
            userImg: [], //用户头像地址
        },
        methods: {
            //查询所有评论
            getComments: function () {
                //获取后台数据
                let url = "comment/findComments.do";
                let params = {
                    currentPage: this.currentPage, //当前页码
                    pageSize: this.pageSize, //每页显示的数量
                };

                let vue_quote = this;

                getWithParams(url, params, function (data) {
                    vue_quote.commentsPb = data;
                    vue_quote.resultList = data.list;
                    vue_quote.dataTotal = data.total;
                    del_all_vue.dataTotal = data.total;
                    console.log("vue_quote.resultList----");
                    console.log(vue_quote.resultList);

                    console.log("http://localhost:8080/merchant_api_war_exploded/imgDo/fileDownload?id="+data.list[0].user.userImg);

                    console.log("data.list.user.userImg--------");
                    data.list.forEach(function (result) {

                        vue_quote.userImg.push("http://localhost:8080/merchant_api_war_exploded/imgDo/fileDownload?id="+result.user.userImg);
                        console.log(result.user.userImg);
                    })
                });
            },

            //删除评论（单条）
            deleteComment: function (commentId) {
                //获取后台数据
                let url = "comment/deleteCommentById.do";
                let params = {
                    commentId: commentId,
                };

                let vue_quote = this;
                getWithParams(url, params, function (data) {
                    console.log("删除的返回---------" + data);
                    vue_quote.delData = data;
                    //executeLayui(); //执行layui
                });
            },

            /*用户-查看*/
            member_show(title, url, id, w, h) {
                console.log("此方法被调用");
                url = url + "?userId=" + id;
                console.log(url);
                layer_show(title, url, w, h);
            },
            /*用户-删除*/
            member_del(obj, id, index2) {
                layer.confirm('确认要删除吗？', function (index) {
                    console.log("删除操作----------" + id);
                    main_vue.deleteComment(id);
                    main_vue.resultList.splice(index2, 1);
                    if (this.delData == 0) {
                        layer.msg('删除失败!', {icon: 1, time: 1000});
                    } else {
                        //$(obj).parents("tr").remove();
                        layer.msg('已删除!', {icon: 1, time: 1000});
                    }
                });
            },

            /*全选/全不选*/
            changeAllChecked() {
                let thisObj = this;
                if (thisObj.checked) { //如果为true，表示全选
                    thisObj.resultList.forEach(function (comment) { //遍历评论结果集，拿到每条评论
                        thisObj.checkArr.push(comment.id); //把每条评论的id添加到数组中
                    });
                    thisObj.checkedIds = thisObj.checkArr; //赋给放置选中的id的集合，目的是为了批量删除
                    thisObj.checkArr = []; //置空
                } else {
                    //不全选
                    thisObj.checkedIds = [];
                }
            },
        },

        watch: {
            /*监听选择框*/
            //监听和全选框绑定的vue data的属性
            "checkedIds": function () {
                if (this.checkedIds.length == this.resultList.length) {
                    //如果被选中的id集合长度等于结果长度
                    this.checked = true; //true表示全选
                } else {
                    this.checked = false; //不全选
                }
            }
        },

        /**
         * 页面加载完成，并且Vue对象加载完成之后回调该函数：mounted
         */
        mounted: function () {
            this.getComments();
        }
    });


    var search_for_vue = new Vue({
        el: "#search_for",
        data: {
            currentPage: 1, //当前页码
            pageSize: 5, //每页显示的数量
            startDate: "", //开始日期
            endDate: "", //结束日期
            searchKey: "", //关键词
        },
        methods: {
            //模糊查询
            getCommentsForsearch: function () {
                console.log("开始日期----" + this.startDate);
                console.log("结束日期----" + this.endDate);
                console.log("搜索----" + this.searchKey);

                let paramsMap = {
                    'currentPage': this.currentPage,
                    'pageSize': this.pageSize,
                    'startDate': this.startDate,
                    'endDate': this.endDate,
                    'searchKey': this.searchKey
                };
                //获取后台数据
                let url = "comment/findCommentsWithLike.do";

                postWithJson(url, paramsMap, function (data) {
                    main_vue.commentsPb = data;
                    main_vue.resultList = data.list;
                    main_vue.dataTotal = data.total;
                    del_all_vue.dataTotal = data.total;
                    console.log("模糊查询-----------" + main_vue.dataTotal);
                    //executeLayui(); //加载layui分页
                });
            },
            //根据日期查询评论
            getForDate: function () {
                let paramsMap = {
                    'currentPage': this.currentPage,
                    'pageSize': this.pageSize,
                    'startDate': this.startDate,
                    'endDate': this.endDate,
                };
                //获取后台数据
                let url = "comment/findCommentsWithDate.do";

                postWithJson(url, paramsMap, function (data) {
                    main_vue.commentsPb = data;
                    main_vue.resultList = data.list;
                    main_vue.dataTotal = data.total;
                    del_all_vue.dataTotal = data.total;
                    //executeLayui(); //执行layui
                });
            }
        },
    });

    var del_all_vue = new Vue({
        el: "#del_all_vue",
        data: {
            dataTotal: 0,//数据总数
            delData: 0,//删除的结果
        },
        methods: {
            /*批量删除*/
            dataDel() {
                let vue_quote = this;
                main_vue.checkedIds.forEach(function (commentId) {
                    //获取后台数据
                    let url = "comment/deleteCommentById.do";
                    let params = {
                        commentId: commentId,
                    };
                    getWithParams(url, params, function (data) {
                        vue_quote.delData = data;
                        main_vue.getComments();
                    });
                });
                //main_vue.resultList.splice(index2, 1);
                console.log("main_vue.checkedIds=========");
                console.log(main_vue.checkedIds);
            },
        },
    });

    //executeLayui(); //执行layui

    //layui分页脚本
    layui.use(['laypage', 'layer'], function () {
        var laypage = layui.laypage,
            layer = layui.layer;

        //总页数大于页码总数
        laypage.render({
            elem: 'pagination',
            count: main_vue.dataTotal, //总记录数
            groups: 3, //导航条连续页码
            limit: main_vue.pageSize, //每页显示的数量

            jump: function (obj, first) {
                console.log(obj);
                console.log("main_vue.dataTotal----" + main_vue.dataTotal);
                console.log("obj.count----" + obj.count);
                console.log("shifou---------首次" + first);
                //首次不执行
                if (first) {
                    return;
                }

                console.log(search_for_vue.searchKey != "");
                // obj.curr 当前页码
                if (search_for_vue.searchKey != "") {
                    search_for_vue.currentPage = obj.curr;
                    search_for_vue.getCommentsForsearch();
                    this.count = main_vue.dataTotal;
                    return;
                }
                if (search_for_vue.startDate != "" && search_for_vue.endDate != "") {
                    search_for_vue.currentPage = obj.curr;
                    search_for_vue.getForDate();
                    this.count = main_vue.dataTotal;
                    return;
                } else {
                    main_vue.currentPage = obj.curr;
                    main_vue.getComments();
                    this.count = main_vue.dataTotal;
                }
            }
        });
    });
</script>

<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>